package com.pristine.domain;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.SequenceGenerator;

@Entity(name="appointment_master")
public class AppointmentEntity {
	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE,generator= "appointment-gen")
	@SequenceGenerator(name = "appointment-gen", sequenceName = "APPOINTMENT_SEQ", allocationSize = 1, initialValue = 0)
	@Column(name="APP_ID")
	private int appId;
	
	@Column(name="DATE")
	private Date date;
	
	@Column(name="TIME")
	private String time;
	
	@OneToOne
    @JoinColumn(name="UHID")
	private PatientEntity patient;
	
	@ManyToOne(cascade = CascadeType.ALL)
	@JoinColumn(name="DOCTOR_ID", nullable=true)
	private DoctorMasterEntity doctor;
	
	@Column(name="COMPLAINTS")
	private String complaints;
	
	@OneToOne
    @JoinColumn(name="DEPARTMENT_ID")
	private DepartmentMasterEntity department;
	
	@Column(name="OPERATOR")
	private int operator; 
	
	@Column(name="COMPLETE")
	private char complete;
	
	@Column(name="BILL_GENERATED")
	private char billGenerated;
		
	@Column(name="STATUS")
	private String status;
	
	@Column(name="CREATED_ON")
	private Date createdOn ;
	
	@Column(name="MODIFIED_ON")
	private Date modifiedOn;
	
	@Column(name="CREATED_BY")
	private Integer createdBy;
	
	@Column(name="MODIFIED_BY")
	private Integer modifiedBy;

	public int getAppId() {
		return appId;
	}

	public void setAppId(int appId) {
		this.appId = appId;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public String getTime() {
		return time;
	}

	public void setTime(String time) {
		this.time = time;
	}

	

	public String getComplaints() {
		return complaints;
	}

	public void setComplaints(String complaints) {
		this.complaints = complaints;
	}

	public int getOperator() {
		return operator;
	}

	public void setOperator(int operator) {
		this.operator = operator;
	}

	public char getComplete() {
		return complete;
	}

	public void setComplete(char complete) {
		this.complete = complete;
	}

	public char getBillGenerated() {
		return billGenerated;
	}

	public void setBillGenerated(char billGenerated) {
		this.billGenerated = billGenerated;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public Date getCreatedOn() {
		return createdOn;
	}

	public void setCreatedOn(Date createdOn) {
		this.createdOn = createdOn;
	}

	public Date getModifiedOn() {
		return modifiedOn;
	}

	public void setModifiedOn(Date modifiedOn) {
		this.modifiedOn = modifiedOn;
	}

	public Integer getCreatedBy() {
		return createdBy;
	}

	public void setCreatedBy(Integer createdBy) {
		this.createdBy = createdBy;
	}

	public Integer getModifiedBy() {
		return modifiedBy;
	}

	public void setModifiedBy(Integer modifiedBy) {
		this.modifiedBy = modifiedBy;
	}

	public PatientEntity getPatient() {
		return patient;
	}

	public void setPatient(PatientEntity patient) {
		this.patient = patient;
	}

	public DoctorMasterEntity getDoctor() {
		return doctor;
	}

	public void setDoctor(DoctorMasterEntity doctor) {
		this.doctor = doctor;
	}

	public DepartmentMasterEntity getDepartment() {
		return department;
	}

	public void setDepartment(DepartmentMasterEntity department) {
		this.department = department;
	}
}
